#include <iostream>
#include <vector>
#include "Eigen/Eigen"
#include "Rasterizer.hpp"

using byte = unsigned char;
using std::cout;
using std::endl;

int main(int argc, char const* argv[]) {
    Rasterizer r(500, 400, 3);
    Triangle t1(
        { vec4{0.2, 0.25, 0.1, 1},vec4{0.5, 0.75, 0.4, 1},vec4{0.8, 0.5, 0.8, 1} },
        { vec3{0.1, 0.2, 0.6},vec3{0.1, 0.2, 0.6},vec3{0.1, 0.2, 0.6} });
    Triangle t2(
        { vec4{0.1, 0.4, 0.2, 1},vec4{0.6, 0.15, 0.4, 1},vec4{0.3, 0.75, 0.3, 1} },
        { vec3{0.8, 0.25, 0.1},vec3{0.8, 0.25, 0.1},vec3{0.8, 0.25, 0.1} });
    Triangle t3(
        { vec4{-0.2, 0.3, 0.1, 1},vec4{0.6, 0.9, 0.6, 1},vec4{1.95, 0.6, 0.1, 1} },
        { vec3{0.8, 0.25, 0.1},vec3{0.1, 0.9, 0.1},vec3{0.1, 0.2, 1} });
    r.drawTriangles({ t3,t1,t2 }, 3);
    r.write("./res/out.png");

    return 0;
}
